s = input()
s1 = ''
k = 0
for i in range(len(s)):
    if s[i] in '([':
        s1 = s1 + s[i]
    elif len(s1) > 0 and s[i] == ')' and s1[-1] == '(':
        s1 = s1[:-1]
    elif len(s1) > 0 and s[i] == ']' and s1[-1] == '[':
        s1 = s1[:-1]    
    else:
        k += 1
        break
    print(s1)
    
if s1 == '' and k == 0:
    print('+')
else:
    print('-')